﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sis.Entities;


namespace Sis.Repository
{
    public class UbigeoRepository :MasterRepository, IUbigeoRepository
    {
        public List<Ubigeo> GetallFromUbigeosByCriterio(string criterio)
        {
            var query = from p in Context.Ubigos
                select p;
            if (criterio!=null && criterio!=string.Empty)
            {
                query = from p in query
                    where p.Nombre.ToUpper().Contains(criterio.ToUpper())
                    select p;

            }
            return query.ToList();
        }
    }
}
